<template>
	<view class="memberAdvertising" v-if="popShop">
		<u-popup :show="popShop" @close="close" @open="open" mode="center" :round="20">
			<view class="pop">
				<image :src="$request.IMG + popData.cover" mode="" class="tipsImg"></image>
				<text class="header">{{popData.title}}</text>
				<text class="content">{{popData.content}}</text>
				<view class="button">
					<view @click="submit">查看详情</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		name:"memberAdvertising",
		data() {
			return {
				
			};
		},
		props:{
			popData:{},
			popShop:false,
		},
		mounted() {
			// this.show = this.popShop;
			// this.data = this.popData;
		},
		methods: {
			// query(){
			// 	this.$request.get(`/app/pollingAdvertisingPopup`).then(res => {
			// 		if(res != null){
			// 			this.show = true
			// 			this.data = res.data;
			// 		}
			// 	})
			// },
			submit(){
				this.$emit('fnPopShop',this.popData)
			},
			open(){
				this.show = true
			},
			close(){
				// this.show = false
			},
		}
	}
</script>

<style lang="scss" scoped>
.pop{
	width: 600rpx;
	display: flex;
	align-items: center;
	flex-direction: column;
	position: relative;
	padding-bottom: 30rpx;
	.tipsImg{
		width: 100%;
		height: 250rpx;
		border-radius: 30rpx 30rpx 0 0;
	}
	.header{
		display: inline-block;
		padding-top: 50rpx;
		font-size: 36rpx;
		font-weight: bold;
	}
	.content{
		padding: 30rpx 50rpx;
		color: #9a9a9a;
		// text-align: center;
		font-size: 28rpx;
		line-height: 1.4;
	}
	.button{
		margin: 0 50rpx;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-around;
		view{
			border-radius: 40rpx;
			margin-top: 50rpx;
			width: 400rpx;
			height: 80rpx;
			line-height: 80rpx;
			text-align: center;
			background-image: linear-gradient(to right, #01c67e , #00ebb1);
			color: #fff;
		}
	}
}
</style>